package com.chm.concurrency.example.publish;

import com.chm.concurrency.annoations.NotRecommend;
import com.chm.concurrency.annoations.NotThreadSafe;
import com.chm.concurrency.example.test.TestController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


@NotThreadSafe
@NotRecommend
public class Escape {
    private static Logger logger = LoggerFactory.getLogger(TestController.class);

    private int thisCanBeEscape = 0;

    public Escape () {
        new InnerClass();
    }

    private class InnerClass {

        public InnerClass() {
            logger.info("{}", Escape.this.thisCanBeEscape);
        }
    }

    public static void main(String[] args) {
        new Escape();
    }
}
